<template>
  <div class="dashContent">
    <div class="header">
      <div class="title">
        <div class="line" />
        <div class="text name">人员考勤</div>
        <!-- <div class="text">查看详情&nbsp;></div> -->
      </div>
    </div>
    <div class="content">
      <div class="div">
        <div class="conbg">
          <div>
            <div class="img"><div>0%</div></div>
            <piechart
              style="margin: -109px 0 0 6px;"
              echart="echart1"
              :echart-style="styles"
              :title-text="title"
              :tooltip-formatter="b"
              :opinion="c"
              :series-name="d"
              :opinion-data="dataLlist"
              @currentEchartData="getEchartData"
            />
          </div>

        </div>
        <div class="conbg">
          <div>
            <div class="img"><div>0%</div></div>
            <piechart
              style="margin: -109px 0 0 6px;"
              echart="echart2"
              :echart-style="styles"
              :title-text="title"
              :tooltip-formatter="b"
              :opinion="c"
              :series-name="d"
              :opinion-data="dataLlist"
              @currentEchartData="getEchartData"
            />
          </div>
        </div>
      </div>
    </div>
    <div class="time">
      <div class="text">
        <div class="msg">
          <div class="test">今日出工</div>
          <div class="num">--</div>
        </div>
        <div class="msg">
          <div class="test">超时未离场</div>
          <div class="num">--</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Piechart from '@/components/echarts/piechart'

export default {
  name: 'People',
  components: {
    Piechart
  },
  data() {
    return {
      title: '',
      b: '销售数量',
      c: ['香蕉', '苹果', '橘子'],
      d: '销售统计',
      dataLlist: [
        { value: 3, name: '香蕉' },
        { value: 3, name: '苹果' },
        { value: 3, name: '橘子' }
      ],
      styles: {
        height: '140px'
      }
    }
  },
  computed: {},
  created() {
    // 获取屏幕高度
    // this.s.height = document.documentElement.clientHeight - 144 + 'px'
  },
  methods: {
    getEchartData(val) {
      console.log(val)
    }
  }
}
</script>

<style lang="scss" scoped>
.dashContent {
  .header{
    .title{
      display: flex;
      padding: 8px 0 0 6px;
      .line{
        width:4px;
        height:16px;
        background:#ffffff;
        margin-right: 8px;
    }
    .text{
      flex: 1;
      font-size:14px;
      font-weight:500;
      color:#ffffff;
      cursor: pointer;
    }
    .name{
      flex-grow: 4;
    }
    }
  }
  .content{
    margin: 15px 0 0 18px;
    .div{
        display: flex;
        margin-bottom: 12px;
        .conbg{
          // width:50%;
          flex: 1;
          // background: url('../../../assets/images/echart1.png') no-repeat;
          // background-size:35% 50%;
          // -moz-background-size:100% 100%;
          // text-align: center;
          // background-position: center;
          // height: 148px;
          // background:linear-gradient(90deg,rgba(78,203,217,0.2) 0%,rgba(189,75,249,0.1) 100%);
          // margin: 0 22px 0 0;
          div{
            .img{
              background: url('../../../assets/images/echart1.png') no-repeat;
              background-size:100% 100%;
              -moz-background-size:100% 100%;
              width: 69px;
              height: 79px;
              // position: absolute;
              // margin-left: 64px;
              // margin-top: 29px;
              margin: 0 auto;
              div{
                font-size:24px;
                font-weight:bold;
                color:rgba(255,255,255,1);
                text-align: center;
                line-height: 75px;
                margin: 24px 0 0 0;
              }
        }
          }
        .title{
          font-size:14px;
          font-weight:500;
         color:rgba(247,181,0,1);
          text-align: center;
          padding: 12px 0;
        }
        .name{
          font-size:18px;
          font-weight:400;
          color:rgba(255,255,255,1);
          text-align: center;
        }
      }
    }
  }
  .footer{
    display: flex;
    padding: 4px 0 10px 0;
    .title{
      width: 100%;
      .text{
        float: left;
        font-size:14px;
        font-weight:500;
        color:rgba(247,181,0,1);
        margin-left: 17px;
    }
    .name{
      width: 75%;
    }
    }
  }
  .list{
    .content{
      background:#25262f;
      opacity:0.8;
      height:32px;
      margin-right: 22px;
      .title{
        display: flex;
        line-height: 29px;
        font-size:12px;
        font-weight:500;
        color:rgba(247,181,0,1);
        .text{
          margin-left: 8px;
          margin-right: 235px;
        }
      }
    }
  }
  .getlist{
    .info{
      margin: 10px 0 0 16px;
      .text{
        font-size:12px;
        font-weight:400;
        color:rgba(255,255,255,1);
        .div{
          padding: 3px 0;
          .data{
            padding: 5px 0;
             .mag{
              margin-right: 166px
            }
          }
        }
      }

    }
  }
}
.spancolor{
  width: 5px;
    height: 5px;
    background: #44d7b6;
    border: 5px solid rgba(68,215,182,.35);
    display: inline-block;
    border-radius: 50px;
    margin-right: 5px;
    -webkit-box-shadow: 0 0 3px 3px rgba(25,90,121,.9);
    box-shadow: 0 0 3px 3px rgba(25,90,121,.9);
}
 .time{
    background: url('../../../assets/images/dashboard-bottom.png');
    background-size:100% 100%;
    -moz-background-size:100% 100%;
    font-size:12px;
    font-weight:400;
    color:rgba(255,255,255,1);
    height: 70px;
    .text{
      display: flex;
      margin-top: 10px;
      .msg{
        flex: 1;
        text-align: center;
        .test{
            font-size:16px;
            font-weight:400;
            color:rgba(255,255,255,1);
          }
          .num{
            font-size:26px;
            font-weight:bold;
            color:rgba(247,181,0,1);
          }
      }
    }
  }
</style>
